package edu.ucsur.tp.contactcenter.forms;

import java.awt.EventQueue;
import java.beans.PropertyVetoException;
import java.util.List;

import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;

import edu.ucsur.tp.negocio.mantenimientos.UsuarioNego;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class FrmClientesRegistro extends JInternalFrame {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;

	public int modo = 1;
	private JTextField textField_5;
	private JTable table;
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FrmClientesRegistro frame = new FrmClientesRegistro();
					frame.setVisible(true);
					frame.moveToFront();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	
	/**
	 * Create the frame.
	 */
	public FrmClientesRegistro() {
		setClosable(true);
		setFrameIcon(new ImageIcon(FrmClientesRegistro.class.getResource("/edu/ucsur/tp/contactcenter/images/Businessman.png")));
		try {
			setIcon(true);
		} catch (PropertyVetoException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		setTitle("Registro de Cliente");
		setBounds(100, 100, 358, 419);
		getContentPane().setLayout(null);
		
		JButton cmdSalir = new JButton("");
		cmdSalir.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				setVisible(false);
			}
		});
		cmdSalir.setIcon(new ImageIcon(FrmClientesRegistro.class.getResource("/edu/ucsur/tp/contactcenter/images/cancel.png")));
		cmdSalir.setBounds(299, 346, 39, 40);
		getContentPane().add(cmdSalir);
		
		JButton cmdGuardar = new JButton("");
		cmdGuardar.setIcon(new ImageIcon(FrmClientesRegistro.class.getResource("/edu/ucsur/tp/contactcenter/images/guardar.png")));
		cmdGuardar.setBounds(260, 346, 39, 40);
		getContentPane().add(cmdGuardar);
		
		JLabel lblNewLabel = new JLabel("Nombres");
		lblNewLabel.setBounds(24, 46, 103, 14);
		getContentPane().add(lblNewLabel);
		
		JLabel lblIdCliente = new JLabel("Id Cliente");
		lblIdCliente.setBounds(24, 18, 93, 14);
		getContentPane().add(lblIdCliente);
		
		JLabel lblApellidos = new JLabel("Apellidos");
		lblApellidos.setBounds(24, 74, 93, 14);
		getContentPane().add(lblApellidos);
		
		JLabel lblCorreo = new JLabel("Correo");
		lblCorreo.setBounds(24, 102, 67, 14);
		getContentPane().add(lblCorreo);
		
		JLabel lblFecNaci = new JLabel("Fec. Naci.");
		lblFecNaci.setBounds(24, 130, 93, 14);
		getContentPane().add(lblFecNaci);
		
		textField = new JTextField();
		textField.setBounds(129, 18, 200, 20);
		getContentPane().add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		textField_1.setBounds(129, 46, 200, 20);
		getContentPane().add(textField_1);
		
		textField_2 = new JTextField();
		textField_2.setColumns(10);
		textField_2.setBounds(129, 74, 200, 20);
		getContentPane().add(textField_2);
		
		textField_3 = new JTextField();
		textField_3.setColumns(10);
		textField_3.setBounds(129, 102, 200, 20);
		getContentPane().add(textField_3);
		
		textField_4 = new JTextField();
		textField_4.setColumns(10);
		textField_4.setBounds(129, 130, 103, 20);
		getContentPane().add(textField_4);
		
		JLabel lblDdmmyyyy = new JLabel("dd/MM/yyyy");
		lblDdmmyyyy.setBounds(242, 133, 129, 14);
		getContentPane().add(lblDdmmyyyy);
		
		JCheckBox chckbxNewCheckBox = new JCheckBox("Cliente Activo");
		chckbxNewCheckBox.setBounds(22, 322, 97, 23);
		getContentPane().add(chckbxNewCheckBox);
		
		JLabel lblNroDocumento = new JLabel("Nro. Documento");
		lblNroDocumento.setBounds(24, 158, 95, 14);
		getContentPane().add(lblNroDocumento);
		
		textField_5 = new JTextField();
		textField_5.setColumns(10);
		textField_5.setBounds(129, 158, 200, 20);
		getContentPane().add(textField_5);
		
		JLabel lblTelefonos = new JLabel("Telefonos");
		lblTelefonos.setBounds(22, 195, 95, 14);
		getContentPane().add(lblTelefonos);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(22, 220, 314, 92);
		getContentPane().add(scrollPane);
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
					"Tipo", "Nro Telefono", "Notas" 
			}
		));
		scrollPane.setViewportView(table);
		setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{getContentPane(), cmdSalir, cmdGuardar, lblNewLabel, lblIdCliente, lblApellidos, lblCorreo, lblFecNaci, textField, textField_1, textField_2, textField_3, textField_4, lblDdmmyyyy, chckbxNewCheckBox}));

	}
}
